﻿<%@ Page Language="C#" MasterPageFile="~/Admin/admin.master" AutoEventWireup="true"
    CodeFile="Adjustment.aspx.cs" Inherits="Admin_Adjustment" Title="Adjustment" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1"
        PersistenceMethod="Session" />
    <br />
    <data:EntityGridView ID="GridView1" runat="server" AutoGenerateColumns="False" OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
        DataSourceID="AdjustmentDataSource" DataKeyNames="AdjustmentId" AllowMultiColumnSorting="false"
        DefaultSortColumnName="" DefaultSortDirection="Ascending" ExcelExportFileName="Export_Adjustment.xls"
        AllowPaging="True" AllowExportToExcel="True"
        AllowSorting="True" PageSelectorPageSizeInterval="20" RecordsCount="0">
        <Columns>
            <asp:CommandField ShowSelectButton="True" />
            <asp:BoundField DataField="AdjustmentId" HeaderText="Adjustment Id" SortExpression="[AdjustmentId]"
                ReadOnly="True" />
            <asp:BoundField DataField="AdjustmentDate" DataFormatString="{0:dd-MM-yyyy}" HtmlEncode="False"
                HeaderText="Adjustment Date" SortExpression="[AdjustmentDate]" />
            <asp:BoundField DataField="TotalAmountIn" HeaderText="Total Amount In" DataFormatString="{0:#,##0}" SortExpression="[TotalAmountIn]" />
            <asp:BoundField DataField="TotalAmountOut" HeaderText="Total Amount Out" DataFormatString="{0:#,##0}" SortExpression="[TotalAmountOut]" />
            <asp:BoundField DataField="PreparedBy" HeaderText="Prepared By" SortExpression="[PreparedBy]" />
            <asp:BoundField DataField="Remark" HeaderText="Remark" SortExpression="[Remark]" />
            <data:BoundRadioButtonField DataField="IsComplete" HeaderText="Is Complete" SortExpression="[IsComplete]" />
            <data:BoundRadioButtonField DataField="IsApproved" HeaderText="Is Approved" SortExpression="[IsApproved]" />
        </Columns>
        <EmptyDataTemplate>
            <b>No Adjustment Found!</b>
        </EmptyDataTemplate>
    </data:EntityGridView>
    <br />
    <data:AdjustmentDataSource ID="AdjustmentDataSource" runat="server" SelectMethod="GetPaged"
        EnablePaging="True" EnableSorting="True" EnableDeepLoad="True">
        <DeepLoadProperties Method="IncludeChildren" Recursive="False">
            <Types>
                <data:AdjustmentProperty Name="WebUser" />
            </Types>
        </DeepLoadProperties>
        <Parameters>
            <data:CustomParameter Name="WhereClause" Value="" ConvertEmptyStringToNull="false" />
            <data:CustomParameter Name="OrderByClause" Value="AdjustmentId DESC" ConvertEmptyStringToNull="false" />
            <asp:ControlParameter Name="PageIndex" ControlID="GridView1" PropertyName="PageIndex"
                Type="Int32" />
            <asp:ControlParameter Name="PageSize" ControlID="GridView1" PropertyName="PageSize"
                Type="Int32" />
            <data:CustomParameter Name="RecordCount" Value="0" Type="Int32" />
        </Parameters>
    </data:AdjustmentDataSource>
</asp:Content>
